<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="__STATIC__/lib/html5shiv.js"></script>
<script type="text/javascript" src="__STATIC__/lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="__STATIC__/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>我的桌面</title>
</head>
<body>
<div class="page-container">

	<form action="" method="post" class="form form-horizontal" id="form-change_password">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				<span class="c-red">*</span>用户名：
			</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$admin.uname}
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>姓名：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$admin.name}
			</div>
		</div>
		{if $admin.department_id}
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>所属部门：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$depart[$admin.department_pid]}-{$depart[$admin.department_id]}
			</div>
		</div>
		{/if}
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>角色：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$admin_role}
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>创建时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$admin.create_time}
			</div>
		</div>
		{if $admin.vip_code != ''}
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>邀请码：</label>
			<div class="formControls col-xs-8 col-sm-9">
				{$admin.vip_code}&nbsp;<button type="button" class="btn btn-primary radius" onclick="getQrcode()">我的推广二维码</button>
			</div>
		</div>
		{/if}
	</form>

</div>
<footer class="footer mt-20">
	<div class="container">
		<p>
			{$sitename}
		</p>
	</div>
</footer>
<script type="text/javascript" src="__STATIC__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__STATIC__/static/h-ui/js/H-ui.min.js"></script>
<script>
	function getQrcode(){
		$.post('{:url("getQrcode")}', null, function(res){
		    if(res.code == 1){
		        layer.open({
					type:1,
					title:'推广二维码',
					content:'<div style="text-align: center;"><img src="'+res.data.img_url+'" style="width: 220px; display: block; margin: auto;"/><button class="btn btn-primary radius" onclick="downQrcode()">下载</button></div>',
					area:['300px', '300px']
				});
			}else{
		        layer.msg(res.msg);
			}
		});
	}

	function downQrcode(){
	    // console.log();
		location.href ='{:url("downQrcode")}';
	}
</script>
</body>
</html>